﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Grupo3.Scenes;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Grupo3.Objetos;
using Microsoft.Xna.Framework.Input;

namespace Grupo3.Telas
{
    class GameOver : SceneBase
    {
        Objeto2D gameOver;
        SpriteFont segoe_26;
        KeyboardState lastk, currentk;
        
        public override void Start()
        {
            gameOver = new Objeto2D(Game1.instancia.Content.Load<Texture2D>("gameOver"), new Vector2(0, 0));
            segoe_26 = Game1.instancia.Content.Load<SpriteFont>("SpriteFont1");
        }

        public override void Update(GameTime gameTime)
        {
            gameOver.Update(gameTime);

            lastk = currentk;
            currentk = Keyboard.GetState();


            if (currentk.IsKeyDown(Keys.Back))
            {
                SceneManager.setScene(new Menu());
            }
            
        }

        public override void Draw(SpriteBatch spriteBatch)
        {
            gameOver.Draw(spriteBatch);
            spriteBatch.DrawString(segoe_26, "Aperte a tecla Backspace para voltar!", new Vector2(350, 350), Color.Red);
        }

        public override void Terminate()
        {

        }
    }
}